class light_map_pic
{
public:
unsigned char *bmp;
int sizex,sizey;
int bytesx,bytesxy;
int bytespixel;
light_map_pic(int sx,int sy,int bp=3)
{
bytespixel=bp;
sizex=sx;
sizey=sy;
bytesx=sx*bytespixel;
if (bytesx&3) bytesx+=4-(bytesx&3);
bytesxy=bytesx*sizey;
bmp=new unsigned char [bytesxy];
};
virtual ~light_map_pic()
{
if(bmp) delete bmp;
};
};
Member | Type | Description |
---|---|---|
bmp | char * | light_map_pic pixels |
sizex | int | size in x (power of 2) |
sizey | int | size in y (power of 2) |
bytesx | int | number of bytes per line (sizex*bytespixel) |
bytesxy | int | total bytes of the light_map_pic bmp (bytesx*sizey) |
bytespixel | int | the light map bytes per pixel: 3 - RGB 4 - RGBA |
This class implements the light_map picture used when drawing. This picture can have several light_map pictures in it and many light_map classes will use a single light_map_pic.